<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no"/>
    <title>类目选择</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>
    <style>
        body {
            background: #f3f3f3;
            font-size: 16px;
        }

        .aui-icon-left {
            padding-left: 10px;
        }

        /*            header {
                        width: 100%;
                        height: 100px;
                        background: #fff;
                        position: relative;
                        z-index: 9;
                    }
                    .win_title{
                        text-align: center;
                        width: 100%;
                        line-height: 45px;
                        height: 45px;
                    }*/

        .divSeach {
            position: relative;
            width: 80% !important;
            height: 55px;
            margin: 0 auto;
        }
        .divSeach form{
            width: 80%;
        }
        .search {
            height: 35px !important;
            margin: 10px 0 !important;
            padding-left: 35px !important;
            border: none;
            border-radius: 5px;
            background: #f5f5f5 !important;
            font-size: 14px;
        }

        .divSeach .aui-iconfont.aui-icon-search {
            position: absolute;
            left: 0;
            color: #b0b0ae;
            height: 55px;
            line-height: 55px;
            padding-left: 10px;
        }

        .aui-iconfont {
            position: absolute;
        }
        .searchBack{
            height: 55px;
            line-height: 55px;
            margin-left: 5px;
            font-size: 14px;
            display: none;
        }
    </style>
</head>
<body>
<!--         <header class="myBorder">
            <div class="win_title aui-border-b">
                <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
                <div class="">
                    类目选择
                </div>
            </div>
            <div class="divSeach">
                <i class="aui-iconfont aui-icon-search aui-pull-left"></i>
                <input type="search" class="search aui-pull-left" placeholder="搜索您想要的商品类别" id="search-input">
            </div>
        </header> -->
<header class="aui-bar aui-bar-nav aui-border-b">
    <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
    <div class="aui-title">中纺互联</div>
</header>
<!--<div id="searchWrap" class="aui-border-b" style="background: #fff;">-->
    <!--<div class="divSeach">-->
        <!--<i class="aui-iconfont aui-icon-search aui-pull-left"></i>-->
        <!--<form action="javascript:search();">-->
            <!--<input type="search" class="search aui-pull-left" placeholder="搜索您想要的商品类别" id="search-input">-->

        <!--</form>-->
        <!--<span class="aui-pull-left searchBack">返回</span>-->
    <!--</div>-->
<!--</div>-->

</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript" src="../script/jquery-1.11.3.js"></script>
<script type="text/javascript">
    apiready = function () {
        api.parseTapmode();
        var mobile = api.pageParam.mobile;
        var header = $api.dom('header');
        // var footer = $api.dom('footer');
        $api.fixIos7Bar(header);

        var header_h = $api.offset(header).h;
        // var footer_h = $api.offset(footer).h;
        var body_h = $api.offset($api.dom('body')).h - header_h;
//        var searchHeight = $api.offset($api.byId('searchWrap')).h;
        var searchHeight = 0;
        api.openFrame({
            name: 'fenlei_frm',
            url: 'fenlei_frm.html',
            rect: {
                x: 0,
                y: header_h + searchHeight,
                w: 'auto',
                h: body_h - searchHeight
            },
            pageParam: {
                mobile: mobile
            },
            bounces: false,
            vScrollBarEnabled: false,
            hScrollBarEnabled: false
        });
    }
    function search() {
        var content = $api.val($api.byId("search-input"));
        $(".searchBack").show();
        if (content) {
//               api.alert({
//                   title: '搜索提示',
//                   msg: '您输入的内容为：'+content
//               });
            api.execScript({
                frameName: "fenlei_frm",
                script: "showSearchCategory('" + content + "')"
            })
        } else {
            api.toast({
                msg: "请输入要搜索的类目"
            })
        }
    }
    $(".searchBack").click(function () {
        $(".searchBack").hide();
        api.execScript({
            frameName: "fenlei_frm",
            script: "searchBack()"
        })
    })
</script>
</html>
